package com.test.springboot3.springboot3testdemo1.servlet;

import jakarta.servlet.ServletException;
import jakarta.servlet.http.HttpServlet;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import java.io.IOException;

/**
 * Created with IntelliJ IDEA.
 *
 * @author： liuziyang
 * @date： 2024/7/31-下午8:11
 * @description：
 * @modifiedBy：
 * @version: 1.0
 */
public class RegisterServlet extends HttpServlet {
  /**
   * @param req
   * @param resp
   * @throws ServletException
   * @throws IOException
   */
  @Override
  protected void service(HttpServletRequest req, HttpServletResponse resp)
      throws ServletException, IOException {
    String name = getServletConfig().getInitParameter("name");
    String sex = getServletConfig().getInitParameter("sex");

    resp.getOutputStream().println("name:" + name + "sex:" + sex);
  }
}
